<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Axios配置</title>
	</head>
	<body>
		
		<h1>远程Ajax测试</h1>
		<script src="../js/axios.js"></script>
		<script>
			async function getJSON(){
				//返回一个promise对象
				const result = await axios.get('http://localhost:8080/getJSON')
				//通过data获取数据
				return result.data
			}
			
			//调用函数
			getJSON().then(function(result){
				console.log(result)
			})
		</script>
	</body>
</html>
